package kr.saeildamil.androidstudy.homework;

import kr.saeildamil.androidstudy.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class Fruit2 extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.fruit2);
	}
	
	public void mOnClick(View v){
		TextView textFruit = (TextView)findViewById(R.id.fruit);
		switch(v.getId()){
		case R.id.apple:
			textFruit.setText("Apple");
			break;
		case R.id.orange:
			textFruit.setText("Orange");
			break;
		}
    }
}